|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectLocation
public class Location
Represent a location in a rectangular grid.
| Constructor Summary | |
|---|---|
Location(int row,
int col)
Represent a row and column. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Implement content equality. |
int |
getCol()
|
int |
getRow()
|
int |
hashCode()
Use the top 16 bits for the row value and the bottom for the column. |
String |
toString()
Return a string of the form row,column |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Location(int row,
int col)
row - The row.col - The column.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectpublic int getCol()
public int getRow()
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||